package com.jiutong.meipengdai.http.model.services;

import com.jiutong.meipengdai.common.Constants;
import com.jiutong.meipengdai.entity.AccountInfoRespond;
import com.jiutong.meipengdai.entity.AccountSettingRespond;
import com.jiutong.meipengdai.entity.AddressBean;
import com.jiutong.meipengdai.entity.BankCardListRespond;
import com.jiutong.meipengdai.entity.BankInfoRespond;
import com.jiutong.meipengdai.entity.BaseRespond;
import com.jiutong.meipengdai.entity.GatheringListRespond;
import com.jiutong.meipengdai.entity.LoanInfoRespond;
import com.jiutong.meipengdai.entity.LoanOprRecordRespond;
import com.jiutong.meipengdai.entity.LoanRecordRespond;
import com.jiutong.meipengdai.entity.MsgCenterRespond;
import com.jiutong.meipengdai.entity.MsgDetailRespond;
import com.jiutong.meipengdai.entity.ReplayRecoreRespond;
import com.jiutong.meipengdai.entity.ScoreRespond;

import java.util.Map;

import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import rx.Observable;

import static android.os.Build.VERSION_CODES.M;

/**
 * 个人账户接口
 * Created by suxi on 2017/6/1.
 */

public interface MyAccountService {

    /**
     * 账户信息
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<AccountInfoRespond> getAccountInfo(@FieldMap Map<String, Object> fields);

    /**
     * 账户设置
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<AccountSettingRespond> accountSetting(@FieldMap Map<String, Object> fields);

    /**
     * 性别/出生日期
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<BaseRespond> sexBirthday(@FieldMap Map<String, Object> fields);

    /**
     * 银行卡列表
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<BankCardListRespond> getBanklist(@FieldMap Map<String, Object> fields);

    /**
     * 银行卡信息
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<BankInfoRespond> getBankInfo(@FieldMap Map<String, Object> fields);

    /**
     * 添加银行卡
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<BaseRespond> addBannkInfo(@FieldMap Map<String, Object> fields);

    /**
     * 删除银行卡
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<BaseRespond> delBannkInfo(@FieldMap Map<String, Object> fields);

    /**
     * 消息中心
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<MsgCenterRespond> msgCenter(@FieldMap Map<String, Object> fields);

    /**
     * 消息详情
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<MsgDetailRespond> msgDetail(@FieldMap Map<String, Object> fields);

    /**
     * 还款记录
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<ReplayRecoreRespond> getRepayRecord(@FieldMap Map<String, Object> fields);

    /**
     * 贷款记录
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<LoanRecordRespond> getLoanRecord(@FieldMap Map<String, Object> fields);

    /**
     * 贷款详情
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<LoanInfoRespond> getLoanInfo(@FieldMap Map<String, Object> fields);

    /**
     * 贷款操作记录
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<LoanOprRecordRespond> getLoanoprRecord(@FieldMap Map<String, Object> fields);


    /**
     * 我的积分
     *
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<ScoreRespond> getScore(@FieldMap Map<String, Object> fields);

    /**
     * 我的收货地址
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<AddressBean> getAddressList(@FieldMap Map<String, Object> fields);


    /**
     * 修改或删除收货地址
     *
     * @param fieldsMap
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<BaseRespond> saveAddress(@FieldMap Map<String, Object> fields);

    /**
     * 添加新的收获地址
     *
     * @param fields
     * @return
     */

    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<BaseRespond> saveNewAddress(@FieldMap Map<String, Object> fields);

    /**
     * 我的收款
     *
     * @param fields
     * @return
     */

    @FormUrlEncoded
    @POST(Constants.URLEND)
    Observable<GatheringListRespond> getGatheringList(@FieldMap Map<String, Object> fields);
}
